<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="layout" content="bocMain"/>
    <title>进件作业系统</title>
</head>

<body>
<header class="header-title">生成客户链接</header>
<div class="weui-cells weui-cells_form">
    <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">地址链接</label></div>
        <div class="weui-cell__bd">
            <input class="weui-input" type="text" id="url" name="url" value="${this?.url}">
        </div>
    </div>
</div>

<div class="bigBtn">
    <button class="weui-btn weui-btn_primary btn" id="copyUrl" data-clipboard-action="copy" data-clipboard-target="#url">复制链接</button>
    <a href="/bocAppOpportunity/businessManagement" class="weui-btn weui-btn_primary">订单列表</a>
</div>

<asset:javascript src="boc/clipboard.min.js"/>

<script>

    var clipboard = new ClipboardJS('.btn');
    clipboard.on('success', function(e)
    {
        console.log(e);
        helpMessage("地址链接复制成功");
        return;
    });
    clipboard.on('error', function(e)
    {
        console.log(e);
        helpMessage("地址链接复制失败");
    });

    function helpMessage(message) {
        $(".helpMsg").text(message).fadeIn(200);
        setTimeout(function () {
            $(".helpMsg").fadeOut(200);
        }, 2000);
    }
</script>
</body>
</html>
